<?php
/*
 * Created on Feb 26, 2010
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
?>
<?php
		$id = $this->uri->segment(3, 7);
		$CI =& get_instance();
		$CI->load->model('Model_news', 'model_news');
		
		$news_id = $this->uri->segment(4, 1);
		$get_conditional = $this->uri->segment(5, 'lastest_news');
		$node = $CI->processNode($id);
		
		$news_detail = $CI->model_news->find($news_id);
		$datestring = "%M %d, %Y %h:%i %A";
		$time = strtotime($news_detail['postdate']);
		$month = "";
		$cur_month = date("m")*1;
		$cur_year  = date("Y");
		if($cur_month == 1){
			$month_2 = 12;
			$year_2 = $cur_year - 1;
		}else{
			$month_2 = $cur_month-1;
			$year_2 = $cur_year;
		}
		
		if($month_2 == 1){
			$month_3 = 12;
			$year_3 = $cur_year - 1;
		}else{
			$month_3 = $month_2-1;
			$year_3 = $cur_year;
		}
?>
<div class="left-2-col texture">
	<ul class="bullet_list">
		<li><a href="<?=site_url(array('c' => 'home','m' => 'index', 'nav'=>$id, 'get'=> 'lastest_news'))?>"><?=$this->lang->line('Lastest News')?></a></li>
		<li><a href="<?=site_url(array('c' => 'home','m' => 'index', 'nav'=>$id, 'get'=> 'in_3_month'))?>"><?=$this->lang->line('In the last 3 months')?></a>
			<ul class="last_3month">
				<li class="<?=($month==$cur_month)?'selected':''?>"><a href="<?=site_url(array('c' => 'home','m' => 'index', 'nav'=>$id, 'get'=> 'in_3_month', 'month'=>$cur_month))?>"><?=$cur_month."-". $cur_year?></a></li>
				<li class="<?=($month==$month_2)?'selected':''?>"><a href="<?=site_url(array('c' => 'home','m' => 'index', 'nav'=>$id, 'get'=> 'in_3_month', 'month'=>$month_2))?>"><?=$month_2."-". $year_2?></a></li>
				<li class="<?=($month==$month_3)?'selected':''?>"><a href="<?=site_url(array('c' => 'home','m' => 'index', 'nav'=>$id, 'get'=> 'in_3_month', 'month'=>$month_3))?>"><?=$month_3."-". $year_3?></a></li>
			</ul>
		</li>
		<!--<li><a href="<?=site_url(array('c' => 'home','m' => 'index', 'nav'=>$node['id'], 'get'=> 'older'))?>">Older articles</a></li>-->
	</ul>
</div>
<div class="col_center" id="page_search">
	<h2><?= htmlspecialchars($node['nav_name']); ?></h2>
	<div class="big_title"><?=$news_detail['name']?></div>
	<div class="date"><?=mdate($datestring, $time);?></div>
	<div>
		<div class="border_img_big">
			<img src="<?=userfile_img_url($news_detail['img'])?>">
		</div>
		<?=$news_detail['description']?>
	</div>
	<div class="clearfix"></div>
	<div class="back"><a href="<?=site_url(array('c' => 'home','m' => 'index', 'nav'=>$node['id'],'action'=>$get_conditional))?>" title="<?=$this->lang->line('Back')?>"><?=$this->lang->line('Back')?></a></div>

</div>
<div class="clearfix"></div>